export const hash2rgb: any = (hash: string) => {
    // 移除 # 号并处理3位缩写
    let h = hash.replace('#', '')
    if (h.length === 3) {
        h = h.split('').map(c => c + c).join('') // 将每个字符重复一次，扩展为6位
    }
    const hashInt = Number.parseInt(h, 16)
    // 提取RGB分量
    const r = (hashInt >> 16) & 255
    const g = (hashInt >> 8) & 255
    const b = hashInt & 255
    return [r, g, b]
}
